package Event.daliy;

import Creature.Player;
import Event.Story;

/**
 * 日常事件，家里蹲就什么都不会发生，去网吧消耗少许金钱提升随机数额精神，去跑步消耗体力提升健康
 */

public class Dailyevent1 extends Story {

    int random = (int) (Math.random() * 10);

    public Dailyevent1(Player player) {
        super(player);

        eventName = "日常事件";
        happenText = "新的一天开始了，你今天打算去";
        options = new String[]{"家里蹲", "去网吧", "跑步 "};
    }


    @Override
    public void eventHappen(int option) {
        switch (option) {
            case 0:
                endText = "你在家思考人生，似乎想到了什么，但又什么事情都没有发生";
                player.setSan(player.getSan() + random);
                break;

            case 1:
                endText = "你去网吧打了两小时的游戏，出来后感到内心一阵空虚";
                player.setMoney(player.getMoney() - 50);
                player.setSan(player.getSan() + random);
                break;
            case 2:
                endText = "你去跑步了，身体得到了锻炼";
                player.setHealth(player.getHealth() + 10);
                player.setHungry(player.getHungry() - 10);
                break;
        }
    }

    @Override
    public boolean canHappen(Player player) {
        return true;
    }
}



